package AcWing;

import java.util.Scanner;

/**
 * @author ZhuYi
 * @create 2025/3/18 21:36
 */
public class 爬楼梯_5933 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            //dp初始化
            int[] dp = new int[n + 1];
            if (n == 1 || n == 2) {
                System.out.println(n);
                continue;
            }
            dp[1] = 1;
            dp[2] = 2;
            for (int i = 3; i <= n; i++) {
                dp[i] = dp[i - 1] + dp[i - 2];
            }
            System.out.println(dp[n]);
        }
    }
}
